/****** Object:  Stored Procedure dbo.CGO_PaymentLogSave    Script Date: Monday, March 28, 2011 ******/
IF EXISTS ( SELECT  *
            FROM    dbo.sysobjects
            WHERE   id = OBJECT_ID(N'dbo.CGO_PaymentLogSave')
                    AND OBJECTPROPERTY(id, N'IsProcedure') = 1 ) 
  DROP PROCEDURE dbo.CGO_PaymentLogSave
GO

/* -------------------------------------------------------------------------------------
/   PaymentLogAdd
/  ------------------------------------------------------------------------------------- */
SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS OFF 
GO

CREATE PROCEDURE dbo.CGO_PaymentLogSave
  @PaymentLogID INT,
  @PaymentID INT ,
  @AppID NVARCHAR(100) ,
  @ProductKey NVARCHAR(100) ,
  @ProductQuantity INT ,
  @TransactionID NVARCHAR(100) ,
  @TransType NVARCHAR(100) ,
  @ApprovalCode NVARCHAR(100) ,
  @IsTest BIT ,
  @PageNumber NVARCHAR(100) ,
  @ReceiptNumber NVARCHAR(255) ,
  @SalesOrderNumber NVARCHAR(255)
AS 
  DECLARE @RetVal INT
  
  INSERT  INTO dbo.CGO_PaymentLog
          ( PaymentID ,
            AppID ,
            ProductKey ,
            ProductQuantity ,
            TransactionID ,
            TransType ,
            ApprovalCode ,
            IsTest ,
            PageNumber ,
            ReceiptNumber ,
            SalesOrderNumber
          )
  VALUES  ( @PaymentID ,
            @AppID ,
            @ProductKey ,
            @ProductQuantity ,
            @TransactionID ,
            @TransType ,
            @ApprovalCode ,
            @IsTest ,
            @PageNumber ,
            @ReceiptNumber ,
            @SalesOrderNumber
          )

  SET @RetVal = SCOPE_IDENTITY()
  SELECT @RetVal
GO

SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO